import * as HttpClient from './httpclient';

async function test() {
    let result = await HttpClient.get('http://localhost:3000/', {a:31,b:'中国'});
    console.log('get result: ', result.content);

    result = await HttpClient.post({url: 'http://localhost:3000/', data: {c: '美国'}});
    console.log('post result: ', result.content);

    result = await HttpClient.post({url: 'http://localhost:3000/',
        params: {a:42, b: '日本'}, data: {c: '李会文'}});
    console.log('post result: ', result.content);
}

test();